import React from 'react';
import PropTypes from 'prop-types';
Checkbox.propTypes = {
    label: PropTypes.string,
    id: PropTypes.string,
    onClick: PropTypes.func.isRequired,
    checked: PropTypes.bool,
    className: PropTypes.object
};
export default function Checkbox(props) {
    return (
        <div className={`weui-cells__group weui-cells__group_form ${props.className}`} onClick={() => props.onClick()}>
            <div className="weui-cells weui-cells_checkbox">
                <label className="weui-cell weui-cell_active weui-check__label" htmlFor={props.id}>
                    <div className="weui-cell__hd">
                        <input type="checkbox" className="weui-check" name="checkbox1" disabled id={props.id} checked={props.checked} />
                            <i className="weui-icon-checked"></i>
                    </div>
                    <div className="weui-cell__bd">
                        <div>{props.label}</div>
                    </div>
                </label>
            </div>
        </div>
    )
}
